package org.aceor.tennis.common.enums;

/**
 * Created by lxue on 16/5/13.
 */
public enum PayType {
    AA("AA制", 0),
    IPAY("我请客", 1),
    YOUPAY("你请客", 2);

    private String desc;
    private Integer value;

    PayType(String desc, Integer value) {
        this.desc = desc;
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getValue() {
        return value;
    }

    public static PayType valueof(int value) {
        switch (value) {
            case 0:
                return AA;
            case 1:
                return IPAY;
            case 2:
                return YOUPAY;
            default:
                throw new IllegalArgumentException();
        }
    }
}
